Repository navigation
feat: Allow displaying group-by columns on LHS of table - #2149
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: d01d8a2 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
E2E Test Results✅ All tests passed • 150 passed • 3 skipped • 1151s
Tests ran across 4 shards in parallel. |
88be6c3 to
38ae330
Compare
🔴 Tier 4 — CriticalTouches auth, data models, config, tasks, OTel pipeline, ClickHouse, or CI/CD. Why this tier:
Review process: Deep review from a domain expert. Synchronous walkthrough may be required. Stats
|
PR Reviewfeat: Allow displaying group-by columns on LHS of table — well-structured feature with solid test coverage (unit + E2E). No critical bugs or security issues.
✅ Logic for ratio configs (seriesCount = 1), empty result sets, and raw SQL pass-through are all handled correctly and covered by tests. |
| @@ -109,10 +121,11 @@ export default function ChartDisplaySettingsDrawer({ | |||
| <Stack> | |||
| {isTimeChart && ( | |||
| <> | |||
| <Checkbox | |||
| <CheckBoxControlled | |||
There was a problem hiding this comment.
Fix - these checkboxes were not being reset when the reset to defaults button is clicked, since they accept a checked prop instead of the value prop provided by {...register(...)}
| ) { | ||
| groupByKeys = queriedConfig.groupBy.split(',').map(v => v.trim()); |
There was a problem hiding this comment.
This old logic failed when the groupBy contained an alias
38ae330 to
1eb9585
Compare
) ## Summary Follow-up to #2149. Drew added `groupByColumnsOnLeft` to the external-API table chart config and to the conversion path in #2149, but the MCP `hyperdx_save_dashboard` tool did not advertise the field on its table-tile schema. As a result, MCP clients had no way to discover or set the option, even though the underlying save / fetch plumbing already supports it. This change adds the field to `mcpTableTileSchema.config` and extends the existing multi-tile MCP test to assert a table tile with `groupByColumnsOnLeft: true` round-trips through `hyperdx_save_dashboard`. ## Test plan - [x] `yarn tsc --noEmit` clean in `packages/api` - [x] `yarn lint` clean in `packages/api` - [x] Existing MCP dashboard suite passes; the `should create a dashboard with multiple tile types` row now also asserts `groupByColumnsOnLeft` on the table tile round-trips - [x] External API tests covering `groupByColumnsOnLeft` round-trip still pass (no change to that surface; verified locally)
Summary
This PR adds a new display setting for table charts, allowing the user to show Group-By columns on the left side of the table, before the series columns. The default remains the same (show group by columns on the RHS).
The existing group-by column detection code in DBTableChart has been improved to handle a few more cases than it was before, resulting in fewer numeric group-by columns being affected by the NumberFormat.
Screenshots or video
How to test locally or on Vercel
This can be tested in the preview environment, in a dashboard or chart explorer table.
References